#pragma once
#define ITEM_NONE 0
#define ITEM_MASTER_BALL 1
#define ITEM_ULTRA_BALL 2
#define ITEM_GREAT_BALL 3
#define ITEM_POKE_BALL 4
#define ITEM_SAFARI_BALL 5
#define ITEM_NET_BALL 6
#define ITEM_DIVE_BALL 7
#define ITEM_NEST_BALL 8
#define ITEM_REPEAT_BALL 9
#define ITEM_TIMER_BALL 10
#define ITEM_LUXURY_BALL 11
#define ITEM_PREMIER_BALL 12
#define ITEM_POTION 13
#define ITEM_ANTIDOTE 14
#define ITEM_BURN_HEAL 15
#define ITEM_ICE_HEAL 16
#define ITEM_AWAKENING 17
#define ITEM_PARALYZE_HEAL 18
#define ITEM_FULL_RESTORE 19
#define ITEM_MAX_POTION 20
#define ITEM_HYPER_POTION 21
#define ITEM_SUPER_POTION 22
#define ITEM_FULL_HEAL 23
#define ITEM_REVIVE 24
#define ITEM_MAX_REVIVE 25
#define ITEM_FRESH_WATER 26
#define ITEM_SODA_POP 27
#define ITEM_LEMONADE 28
#define ITEM_MOOMOO_MILK 29
#define ITEM_ENERGY_POWDER 30
#define ITEM_ENERGY_ROOT 31
#define ITEM_HEAL_POWDER 32
#define ITEM_REVIVAL_HERB 33
#define ITEM_ETHER 34
#define ITEM_MAX_ETHER 35
#define ITEM_ELIXIR 36
#define ITEM_MAX_ELIXIR 37
#define ITEM_LAVA_COOKIE 38
#define ITEM_BLUE_FLUTE 39
#define ITEM_YELLOW_FLUTE 40
#define ITEM_RED_FLUTE 41
#define ITEM_BLACK_FLUTE 42
#define ITEM_WHITE_FLUTE 43
#define ITEM_BERRY_JUICE 44
#define ITEM_SACRED_ASH 45
#define ITEM_SHOAL_SALT 46
#define ITEM_SHOAL_SHELL 47
#define ITEM_RED_SHARD 48
#define ITEM_BLUE_SHARD 49
#define ITEM_YELLOW_SHARD 50
#define ITEM_GREEN_SHARD 51
#define ITEM_RAGE_CANDY_BAR 52
#define ITEM_OLD_GATEAU 53
#define ITEM_CASTELIACONE 54
#define ITEM_LUMIOSE_GALETTE 55
#define ITEM_SHALOUR_SABLE 56
#define ITEM_HEALTH_WING 57
#define ITEM_MUSCLE_WING 58
#define ITEM_RESIST_WING 59
#define ITEM_GENIUS_WING 60
#define ITEM_CLEVER_WING 61
#define ITEM_SWIFT_WING 62
#define ITEM_HP_UP 63
#define ITEM_PROTEIN 64
#define ITEM_IRON 65
#define ITEM_CARBOS 66
#define ITEM_CALCIUM 67
#define ITEM_RARE_CANDY 68
#define ITEM_PP_UP 69
#define ITEM_ZINC 70
#define ITEM_PP_MAX 71
#define ITEM_DYNAMAX_CANDY 72
#define ITEM_GUARD_SPEC 73
#define ITEM_DIRE_HIT 74
#define ITEM_X_ATTACK 75
#define ITEM_X_DEFEND 76
#define ITEM_X_SPEED 77
#define ITEM_X_ACCURACY 78
#define ITEM_X_SPECIAL 79
#define ITEM_POKE_DOLL 80
#define ITEM_FLUFFY_TAIL 81
#define ITEM_BIG_MALASADA 82
#define ITEM_SUPER_REPEL 83
#define ITEM_MAX_REPEL 84
#define ITEM_ESCAPE_ROPE 85
#define ITEM_REPEL 86
#define ITEM_LINK_CABLE 87
#define ITEM_PROTECTOR 88
#define ITEM_ELECTIRIZER 89
#define ITEM_MAGMARIZER 90
#define ITEM_DUBIOUS_DISC 91
#define ITEM_REAPER_CLOTH 92
#define ITEM_SUN_STONE 93
#define ITEM_MOON_STONE 94
#define ITEM_FIRE_STONE 95
#define ITEM_THUNDER_STONE 96
#define ITEM_WATER_STONE 97
#define ITEM_LEAF_STONE 98
#define ITEM_SHINY_STONE 99
#define ITEM_DUSK_STONE 100
#define ITEM_DAWN_STONE 101
#define ITEM_ICE_STONE 102
#define ITEM_TINY_MUSHROOM 103
#define ITEM_BIG_MUSHROOM 104
#define ITEM_BALM_MUSHROOM 105
#define ITEM_PEARL 106
#define ITEM_BIG_PEARL 107
#define ITEM_STARDUST 108
#define ITEM_STAR_PIECE 109
#define ITEM_NUGGET 110
#define ITEM_HEART_SCALE 111
#define ITEM_RARE_BONE 112
#define ITEM_PEARL_STRING 113
#define ITEM_COMET_SHARD 114
#define ITEM_BIG_NUGGET 115
#define ITEM_HONEY 116
#define ITEM_PRETTY_WING 117
#define ITEM_OVAL_STONE 118
#define ITEM_RAZOR_CLAW 119
#define ITEM_RAZOR_FANG 120
#define ITEM_ORANGE_MAIL 121
#define ITEM_HARBOR_MAIL 122
#define ITEM_GLITTER_MAIL 123
#define ITEM_MECH_MAIL 124
#define ITEM_WOOD_MAIL 125
#define ITEM_WAVE_MAIL 126
#define ITEM_BEAD_MAIL 127
#define ITEM_SHADOW_MAIL 128
#define ITEM_TROPIC_MAIL 129
#define ITEM_DREAM_MAIL 130
#define ITEM_FAB_MAIL 131
#define ITEM_RETRO_MAIL 132
#define ITEM_CHERI_BERRY 133
#define ITEM_CHESTO_BERRY 134
#define ITEM_PECHA_BERRY 135
#define ITEM_RAWST_BERRY 136
#define ITEM_ASPEAR_BERRY 137
#define ITEM_LEPPA_BERRY 138
#define ITEM_ORAN_BERRY 139
#define ITEM_PERSIM_BERRY 140
#define ITEM_LUM_BERRY 141
#define ITEM_SITRUS_BERRY 142
#define ITEM_FIGY_BERRY 143
#define ITEM_WIKI_BERRY 144
#define ITEM_MAGO_BERRY 145
#define ITEM_AGUAV_BERRY 146
#define ITEM_IAPAPA_BERRY 147
#define ITEM_RAZZ_BERRY 148
#define ITEM_BLUK_BERRY 149
#define ITEM_NANAB_BERRY 150
#define ITEM_WEPEAR_BERRY 151
#define ITEM_PINAP_BERRY 152
#define ITEM_POMEG_BERRY 153
#define ITEM_KELPSY_BERRY 154
#define ITEM_QUALOT_BERRY 155
#define ITEM_HONDEW_BERRY 156
#define ITEM_GREPA_BERRY 157
#define ITEM_TAMATO_BERRY 158
#define ITEM_CORNN_BERRY 159
#define ITEM_MAGOST_BERRY 160
#define ITEM_RABUTA_BERRY 161
#define ITEM_NOMEL_BERRY 162
#define ITEM_SPELON_BERRY 163
#define ITEM_PAMTRE_BERRY 164
#define ITEM_WATMEL_BERRY 165
#define ITEM_DURIN_BERRY 166
#define ITEM_BELUE_BERRY 167
#define ITEM_LIECHI_BERRY 168
#define ITEM_GANLON_BERRY 169
#define ITEM_SALAC_BERRY 170
#define ITEM_PETAYA_BERRY 171
#define ITEM_APICOT_BERRY 172
#define ITEM_LANSAT_BERRY 173
#define ITEM_STARF_BERRY 174
#define ITEM_ENIGMA_BERRY_OLD 175
#define ITEM_ENIGMA_BERRY ITEM_ENIGMA_BERRY_OLD
#define ITEM_PRISM_SCALE 176
#define ITEM_SACHET 177
#define ITEM_WHIPPED_DREAM 178
#define ITEM_BRIGHT_POWDER 179
#define ITEM_WHITE_HERB 180
#define ITEM_MACHO_BRACE 181
#define ITEM_EXP_SHARE 182
#define ITEM_QUICK_CLAW 183
#define ITEM_SOOTHE_BELL 184
#define ITEM_MENTAL_HERB 185
#define ITEM_CHOICE_BAND 186
#define ITEM_KINGS_ROCK 187
#define ITEM_SILVER_POWDER 188
#define ITEM_AMULET_COIN 189
#define ITEM_CLEANSE_TAG 190
#define ITEM_SOUL_DEW 191
#define ITEM_DEEP_SEA_TOOTH 192
#define ITEM_DEEP_SEA_SCALE 193
#define ITEM_SMOKE_BALL 194
#define ITEM_EVERSTONE 195
#define ITEM_FOCUS_BAND 196
#define ITEM_LUCKY_EGG 197
#define ITEM_SCOPE_LENS 198
#define ITEM_METAL_COAT 199
#define ITEM_LEFTOVERS 200
#define ITEM_DRAGON_SCALE 201
#define ITEM_LIGHT_BALL 202
#define ITEM_SOFT_SAND 203
#define ITEM_HARD_STONE 204
#define ITEM_MIRACLE_SEED 205
#define ITEM_BLACK_GLASSES 206
#define ITEM_BLACK_BELT 207
#define ITEM_MAGNET 208
#define ITEM_MYSTIC_WATER 209
#define ITEM_SHARP_BEAK 210
#define ITEM_POISON_BARB 211
#define ITEM_NEVER_MELT_ICE 212
#define ITEM_SPELL_TAG 213
#define ITEM_TWISTED_SPOON 214
#define ITEM_CHARCOAL 215
#define ITEM_DRAGON_FANG 216
#define ITEM_SILK_SCARF 217
#define ITEM_UP_GRADE 218
#define ITEM_SHELL_BELL 219
#define ITEM_SEA_INCENSE 220
#define ITEM_LAX_INCENSE 221
#define ITEM_LUCKY_PUNCH 222
#define ITEM_METAL_POWDER 223
#define ITEM_THICK_CLUB 224
#define ITEM_LEEK 225
#define ITEM_STRAWBERRY_SWEET 226
#define ITEM_BERRY_SWEET 227
#define ITEM_LOVE_SWEET 228
#define ITEM_CLOVER_SWEET 229
#define ITEM_FLOWER_SWEET 230
#define ITEM_RIBBON_SWEET 231
#define ITEM_STAR_SWEET 232
#define ITEM_SWEET_APPLE 233
#define ITEM_TART_APPLE 234
#define ITEM_CRACKED_POT 235
#define ITEM_CHIPPED_POT 236
#define ITEM_GALARICA_CUFF 237
#define ITEM_GALARICA_WREATH 238
#define ITEM_CHERISH_BALL 239
#define ITEM_DUSK_BALL 240
#define ITEM_HEAL_BALL 241
#define ITEM_QUICK_BALL 242
#define ITEM_FAST_BALL 243
#define ITEM_LEVEL_BALL 244
#define ITEM_LURE_BALL 245
#define ITEM_HEAVY_BALL 246
#define ITEM_LOVE_BALL 247
#define ITEM_FRIEND_BALL 248
#define ITEM_MOON_BALL 249
#define ITEM_SPORT_BALL 250
#define ITEM_BEAST_BALL 251
#define ITEM_DREAM_BALL 252
#define ITEM_PARK_BALL 253
#define ITEM_RED_SCARF 254
#define ITEM_BLUE_SCARF 255
#define ITEM_PINK_SCARF 256
#define ITEM_GREEN_SCARF 257
#define ITEM_YELLOW_SCARF 258
#define ITEM_MACH_BIKE 259
#define ITEM_COIN_CASE 260
#define ITEM_ITEMFINDER 261
#define ITEM_OLD_ROD 262
#define ITEM_GOOD_ROD 263
#define ITEM_SUPER_ROD 264
#define ITEM_SS_TICKET 265
#define ITEM_CONTEST_PASS 266
#define ITEM_Z_POWER_RING 267
#define ITEM_WAILMER_PAIL 268
#define ITEM_DEVON_GOODS 269
#define ITEM_SOOT_SACK 270
#define ITEM_BASEMENT_KEY 271
#define ITEM_ACRO_BIKE 272
#define ITEM_POKEBLOCK_CASE 273
#define ITEM_LETTER 274
#define ITEM_EON_TICKET 275
#define ITEM_RED_ORB 276
#define ITEM_BLUE_ORB 277
#define ITEM_SCANNER 278
#define ITEM_GO_GOGGLES 279
#define ITEM_METEORITE 280
#define ITEM_ROOM_1_KEY 281
#define ITEM_ROOM_2_KEY 282
#define ITEM_ROOM_4_KEY 283
#define ITEM_ROOM_6_KEY 284
#define ITEM_STORAGE_KEY 285
#define ITEM_ROOT_FOSSIL 286
#define ITEM_CLAW_FOSSIL 287
#define ITEM_DEVON_SCOPE 288

#ifndef UNBOUND //MODIFY THIS TO MATCH THE TMS YOU MADE IN DPE
enum
{
  ITEM_TM01_FOCUS_PUNCH = 0x121,
  ITEM_TM02_DRAGON_CLAW,
  ITEM_TM03_WATER_PULSE,
  ITEM_TM04_CALM_MIND,
  ITEM_TM05_ROAR,
  ITEM_TM06_TOXIC,
  ITEM_TM07_HAIL,
  ITEM_TM08_BULK_UP,
  ITEM_TM09_BULLET_SEED,
  ITEM_TM10_HIDDEN_POWER,
  ITEM_TM11_SUNNY_DAY,
  ITEM_TM12_TAUNT,
  ITEM_TM13_ICE_BEAM,
  ITEM_TM14_BLIZZARD,
  ITEM_TM15_HYPER_BEAM,
  ITEM_TM16_LIGHT_SCREEN,
  ITEM_TM17_PROTECT,
  ITEM_TM18_RAIN_DANCE,
  ITEM_TM19_GIGA_DRAIN,
  ITEM_TM20_SAFEGUARD,
  ITEM_TM21_FRUSTRATION,
  ITEM_TM22_SOLARBEAM,
  ITEM_TM23_IRON_TAIL,
  ITEM_TM24_THUNDERBOLT,
  ITEM_TM25_THUNDER,
  ITEM_TM26_EARTHQUAKE,
  ITEM_TM27_RETURN,
  ITEM_TM28_DIG,
  ITEM_TM29_PSYCHIC,
  ITEM_TM30_SHADOW_BALL,
  ITEM_TM31_BRICK_BREAK,
  ITEM_TM32_DOUBLE_TEAM,
  ITEM_TM33_REFLECT,
  ITEM_TM34_SHOCK_WAVE,
  ITEM_TM35_FLAMETHROWER,
  ITEM_TM36_SLUDGE_BOMB,
  ITEM_TM37_SANDSTORM,
  ITEM_TM38_FIRE_BLAST,
  ITEM_TM39_ROCK_TOMB,
  ITEM_TM40_AERIAL_ACE,
  ITEM_TM41_TORMENT,
  ITEM_TM42_FACADE,
  ITEM_TM43_SECRET_POWER,
  ITEM_TM44_REST,
  ITEM_TM45_ATTRACT,
  ITEM_TM46_THIEF,
  ITEM_TM47_STEEL_WING,
  ITEM_TM48_SKILL_SWAP,
  ITEM_TM49_SNATCH,
  ITEM_TM50_OVERHEAT,
  ITEM_HM01_CUT,
  ITEM_HM02_FLY,
  ITEM_HM03_SURF,
  ITEM_HM04_STRENGTH,
  ITEM_HM05_FLASH,
  ITEM_HM06_ROCK_SMASH,
  ITEM_HM07_WATERFALL,
  ITEM_HM08_ROCK_CLIMB,
};

//New TMs
#define ITEM_TM51 376
#define ITEM_TM52 377
#define ITEM_TM53 378
#define ITEM_TM54 379
#define ITEM_TM55 380
#define ITEM_TM56 381
#define ITEM_TM57 382
#define ITEM_TM58 383
enum
{
  ITEM_TM59_DRAGON_PULSE = 0x180,
  ITEM_TM60_DRAIN_PUNCH,
  ITEM_TM61_WILL_O_WISP,
  ITEM_TM62_SILVER_WIND,
  ITEM_TM63_VENOSHOCK,
  ITEM_TM64_EXPLOSION,
  ITEM_TM65_SHADOW_CLAW,
  ITEM_TM66_PAYBACK,
  ITEM_TM67_RECYCLE,
  ITEM_TM68_GIGA_IMPACT,
  ITEM_TM69_ROCK_POLISH,
  ITEM_TM70_FLASH,
  ITEM_TM71_STONE_EDGE,
  ITEM_TM72_AVALANCHE,
  ITEM_TM73_THUNDER_WAVE,
  ITEM_TM74_GYRO_BALL,
  ITEM_TM75_SWORDS_DANCE,
  ITEM_TM76_STEALTH_ROCK,
  ITEM_TM77_FLAME_CHARGE,
  ITEM_TM78_LOW_SWEEP,
  ITEM_TM79_DARK_PULSE,
  ITEM_TM80_ROCK_SLIDE,
  ITEM_TM81_X_SCISSOR,
  ITEM_TM82_SLEEP_TALK,
  ITEM_TM83_SCALD,
  ITEM_TM84_POISON_JAB,
  ITEM_TM85_DREAM_EATER,
  ITEM_TM86_GRASS_KNOT,
  ITEM_TM87_SWAGGER,
  ITEM_TM88_PLUCK,
  ITEM_TM89_U_TURN,
  ITEM_TM90_SUBSTITUTE,
  ITEM_TM91_FLASH_CANNON,
  ITEM_TM92_VOLT_SWITCH,
  ITEM_TM93_DRAGON_TAIL,
  ITEM_TM94_INCINERATE,
  ITEM_TM95_STRUGGLE_BUG,
  ITEM_TM96_BULLDOZE,
  ITEM_TM97_FROST_BREATH,
  ITEM_TM98_WORK_UP,
  ITEM_TM99_WILD_CHARGE,
  ITEM_TM100_INFESTATION,
  ITEM_TM101_POWER_UP_PUNCH,
  ITEM_TM102_DAZZLING_GLEAM,
  ITEM_TM103_SLUDGE_WAVE,
  ITEM_TM104_PSYSHOCK,
  ITEM_TM105_BRUTAL_SWING,
  ITEM_TM106_SMART_STRIKE,
  ITEM_TM107_ACROBATICS,
  ITEM_TM108_SNARL,
  ITEM_TM109_DEFOG,
  ITEM_TM110_CAPTIVATE,
  ITEM_TM111_SMACK_DOWN,
  ITEM_TM112_ROUND,
  ITEM_TM113_ECHOED_VOICE,
  ITEM_TM114_NATURAL_GIFT,
  ITEM_TM115_QUASH,
  ITEM_TM116_TRICK_ROOM,
  ITEM_TM117_FLING,
  ITEM_TM118_AURORA_VEIL,
  ITEM_TM119_SKY_DROP,
  ITEM_TM120_NATURE_POWER,
};
#endif

#define ITEM_DYNAMAX_BAND 347
#define ITEM_GOLD_TEETH 348
#define ITEM_OAKS_PARCEL 349
#define ITEM_POKE_FLUTE 350
#define ITEM_SECRET_KEY 351
#define ITEM_BIKE_VOUCHER 352
#define ITEM_MEGA_RING 353
#define ITEM_OLD_AMBER 354
#define ITEM_CARD_KEY 355
#define ITEM_LIFT_KEY 356
#define ITEM_HELIX_FOSSIL 357
#define ITEM_DOME_FOSSIL 358
#define ITEM_SILPH_SCOPE 359
#define ITEM_BICYCLE 360
#define ITEM_TOWN_MAP 361
#define ITEM_VS_SEEKER 362
#define ITEM_FAME_CHECKER 363
#define ITEM_TM_CASE 364
#define ITEM_BERRY_POUCH 365
#define ITEM_TEACHY_TV 366
#define ITEM_TRI_PASS 367
#define ITEM_RAINBOW_PASS 368
#define ITEM_TEA 369
#define ITEM_MYSTIC_TICKET 370
#define ITEM_AURORA_TICKET 371
#define ITEM_POWDER_JAR 372
#define ITEM_RUBY 373
#define ITEM_SAPPHIRE 374
#define ITEM_X_SP_DEF 375 //DONT USE THIS. This is to help CFRU compile

//Type-Resist + New Berries
#define ITEM_OCCA_BERRY 0x1BE
#define ITEM_PASSHO_BERRY 0x1BF
#define ITEM_WACAN_BERRY 0x1C0
#define ITEM_RINDO_BERRY 0x1C1
#define ITEM_YACHE_BERRY 0x1C2
#define ITEM_CHOPLE_BERRY 0x1C3
#define ITEM_KEBIA_BERRY 0x1C4
#define ITEM_SHUCA_BERRY 0x1C5
#define ITEM_COBA_BERRY 0x1C6
#define ITEM_PAYAPA_BERRY 0x1C7
#define ITEM_TANGA_BERRY 0x1C8
#define ITEM_CHARTI_BERRY 0x1C9
#define ITEM_KASIB_BERRY 0x1CA
#define ITEM_HABAN_BERRY 0x1CB
#define ITEM_COLBUR_BERRY 0x1CC
#define ITEM_BABIRI_BERRY 0x1CD
#define ITEM_CHILAN_BERRY 0x1CE
#define ITEM_MICLE_BERRY 0x1CF
#define ITEM_CUSTAP_BERRY 0x1D0
#define ITEM_JABOCA_BERRY 0x1D1
#define ITEM_ROWAP_BERRY 0x1D2
#define ITEM_ROSELI_BERRY 0x1D3
#define ITEM_KEE_BERRY 0x1D4
#define ITEM_MARANGA_BERRY 0x1D5

//New Key Items
#define ITEM_OVAL_CHARM 0x1D6
#define ITEM_SHINY_CHARM 0x1D7
#define ITEM_RAINBOW_WING 0x1D8
#define ITEM_SILVER_WING 0x1D9
#define ITEM_MAGMA_STONE 0x1DA
#define ITEM_LIGHT_STONE 0x1DB
#define ITEM_DARK_STONE 0x1DC
#define ITEM_SUN_FLUTE 0x1DD
#define ITEM_MOON_FLUTE 0x1DE
#define ITEM_GRACIDEA 0x1DF
#define ITEM_DNA_SPLICERS 0x1E0
#define ITEM_REVEAL_GLASS 0x1E1
#define ITEM_PRISON_BOTTLE 0x1E2
#define ITEM_N_SOLARIZER 0x1E3
#define ITEM_N_LUNARIZER 0x1E4

//Legendary Hold Items
#define ITEM_RUSTED_SWORD 0x1E5
#define ITEM_RUSTED_SHIELD 0x1E6
#define ITEM_ADAMANT_ORB 0x1E7
#define ITEM_LUSTROUS_ORB 0x1E8
#define ITEM_GRISEOUS_ORB 0x1E9

//Arceus Plates
#define ITEM_FIST_PLATE 0x1EA
#define ITEM_SKY_PLATE 0x1EB
#define ITEM_TOXIC_PLATE 0x1EC
#define ITEM_EARTH_PLATE 0x1ED
#define ITEM_STONE_PLATE 0x1EE
#define ITEM_INSECT_PLATE 0x1EF
#define ITEM_SPOOKY_PLATE 0x1F0
#define ITEM_IRON_PLATE 0x1F1
#define ITEM_FLAME_PLATE 0x1F2
#define ITEM_SPLASH_PLATE 0x1F3
#define ITEM_MEADOW_PLATE 0x1F4
#define ITEM_ZAP_PLATE 0x1F5
#define ITEM_MIND_PLATE 0x1F6
#define ITEM_ICICLE_PLATE 0x1F7
#define ITEM_DRACO_PLATE 0x1F8
#define ITEM_DREAD_PLATE 0x1F9
#define ITEM_PIXIE_PLATE 0x1FA

//Silvally Memories
#define ITEM_FIGHTING_MEMORY 0x1FB
#define ITEM_FLYING_MEMORY 0x1FC
#define ITEM_POISON_MEMORY 0x1FD
#define ITEM_GROUND_MEMORY 0x1FE
#define ITEM_ROCK_MEMORY 0x1FF
#define ITEM_BUG_MEMORY 0x200
#define ITEM_GHOST_MEMORY 0x201
#define ITEM_STEEL_MEMORY 0x202
#define ITEM_FIRE_MEMORY 0x203
#define ITEM_WATER_MEMORY 0x204
#define ITEM_GRASS_MEMORY 0x205
#define ITEM_ELECTRIC_MEMORY 0x206
#define ITEM_PSYCHIC_MEMORY 0x207
#define ITEM_ICE_MEMORY 0x208
#define ITEM_DRAGON_MEMORY 0x209
#define ITEM_DARK_MEMORY 0x20A
#define ITEM_FAIRY_MEMORY 0x20B

//Genesect Drives
#define ITEM_BURN_DRIVE 0x20C
#define ITEM_DOUSE_DRIVE 0x20D
#define ITEM_SHOCK_DRIVE 0x20E
#define ITEM_CHILL_DRIVE 0x20F

//Nectars
#define ITEM_RED_NECTAR 0x210
#define ITEM_YELLOW_NECTAR 0x211
#define ITEM_PINK_NECTAR 0x212
#define ITEM_PURPLE_NECTAR 0x213

//Mega Stones
#define ITEM_ULTRANECROZIUM_Z 0x214
#define ITEM_VENUSAURITE 0x215
#define ITEM_CHARIZARDITE_X 0x216
#define ITEM_CHARIZARDITE_Y 0x217
#define ITEM_BLASTOISINITE 0x218
#define ITEM_BEEDRILLITE 0x219
#define ITEM_PIDGEOTITE 0x21A
#define ITEM_ALAKAZITE 0x21B
#define ITEM_SLOWBRONITE 0x21C
#define ITEM_GENGARITE 0x21D
#define ITEM_KANGASKHANITE 0x21E
#define ITEM_PINSIRITE 0x21F
#define ITEM_GYARADOSITE 0x220
#define ITEM_AERODACTYLITE 0x221
#define ITEM_MEWTWONITE_X 0x222
#define ITEM_MEWTWONITE_Y 0x223
#define ITEM_AMPHAROSITE 0x224
#define ITEM_STEELIXITE 0x225
#define ITEM_SCIZORITE 0x226
#define ITEM_HERACRONITE 0x227
#define ITEM_HOUNDOOMINITE 0x228
#define ITEM_TYRANITARITE 0x229
#define ITEM_SCEPTILITE 0x22A
#define ITEM_BLAZIKENITE 0x22B
#define ITEM_SWAMPERTITE 0x22C
#define ITEM_GARDEVOIRITE 0x22D
#define ITEM_SABLENITE 0x22E
#define ITEM_MAWILITE 0x22F
#define ITEM_AGGRONITE 0x230
#define ITEM_MEDICHAMITE 0x231
#define ITEM_MANECTITE 0x232
#define ITEM_SHARPEDONITE 0x233
#define ITEM_CAMERUPTITE 0x234
#define ITEM_ALTARIANITE 0x235
#define ITEM_BANETTITE 0x236
#define ITEM_ABSOLITE 0x237
#define ITEM_GLALITITE 0x238
#define ITEM_SALAMENCITE 0x239
#define ITEM_METAGROSSITE 0x23A
#define ITEM_LATIASITE 0x23B
#define ITEM_LATIOSITE 0x23C
#define ITEM_LOPUNNITE 0x23D
#define ITEM_GARCHOMPITE 0x23E
#define ITEM_LUCARIONITE 0x23F
#define ITEM_ABOMASITE 0x240
#define ITEM_GALLADITE 0x241
#define ITEM_AUDINITE 0x242
#define ITEM_DIANCITE 0x243

//Z-Crystals
enum
{
  ITEM_NORMALIUM_Z = 0x244,    //All items after this will be 0x244 + 1, 0x244 + 2...
  ITEM_FIGHTINIUM_Z,   //0x245 //Put the Z-Crystals in order
  ITEM_FLYINIUM_Z,    //0x246
  ITEM_POISONIUM_Z,    //0x247
  ITEM_GROUNDIUM_Z,    //0x248
  ITEM_ROCKIUM_Z,     //0x249
  ITEM_BUGINIUM_Z,    //0x24A
  ITEM_GHOSTIUM_Z,    //0x24B
  ITEM_STEELIUM_Z,    //0x24C
  ITEM_FIRIUM_Z,     //0x24D
  ITEM_WATERIUM_Z,    //0x24E
  ITEM_GRASSIUM_Z,    //0x24F
  ITEM_ELECTRIUM_Z,    //0x250
  ITEM_PSYCHIUM_Z,    //0x251
  ITEM_ICIUM_Z,      //0x252
  ITEM_DRAGONIUM_Z,    //0x253
  ITEM_DARKINIUM_Z,    //0x254
  ITEM_FAIRIUM_Z,     //0x255
  ITEM_ALORAICHIUM_Z, //0x256
  ITEM_DECIDIUM_Z,    //0x257
  ITEM_EEVIUM_Z,     //0x258
  ITEM_INCINIUM_Z,    //0x259
  ITEM_KOMMONIUM_Z,    //0x25A
  ITEM_LUNALIUM_Z,    //0x25B
  ITEM_LYCANIUM_Z,    //0x25C
  ITEM_MARSHADIUM_Z,   //0x25D
  ITEM_MEWNIUM_Z,     //0x25E
  ITEM_MIMIKIUM_Z,    //0x25F
  ITEM_PIKANIUM_Z,    //0x260
  ITEM_PIKASHUNIUM_Z,   //0x261
  ITEM_PRIMARIUM_Z,    //0x262
  ITEM_SNORLIUM_Z,    //0x263
  ITEM_SOLGANIUM_Z,    //0x264
  ITEM_TAPUNIUM_Z,    //0x265
};

//Apricorns
#define ITEM_BLACK_APRICORN 0x266
#define ITEM_BLUE_APRICORN 0x267
#define ITEM_GREEN_APRICORN 0x268
#define ITEM_PINK_APRICORN 0x269
#define ITEM_RED_APRICORN 0x26A
#define ITEM_WHITE_APRICORN 0x26B
#define ITEM_YELLOW_APRICORN 0x26C

//Relic Items
#define ITEM_RELIC_COPPER 0x26D
#define ITEM_RELIC_SILVER 0x26E
#define ITEM_RELIC_GOLD 0x26F
#define ITEM_RELIC_VASE 0x270
#define ITEM_RELIC_BAND 0x271
#define ITEM_RELIC_STATUE 0x272
#define ITEM_RELIC_CROWN 0x273

//Fossils
#define ITEM_SKULL_FOSSIL 0x274
#define ITEM_ARMOR_FOSSIL 0x275
#define ITEM_COVER_FOSSIL 0x276
#define ITEM_PLUME_FOSSIL 0x277
#define ITEM_JAW_FOSSIL 0x278
#define ITEM_SAIL_FOSSIL 0x279
#define ITEM_FOSSILIZED_BIRD 0x27A
#define ITEM_FOSSILIZED_FISH 0x27B
#define ITEM_FOSSILIZED_DRAKE 0x27C
#define ITEM_FOSSILIZED_DINO 0x27D

//Random Normal Items
#define ITEM_ODD_KEYSTONE 0x27E
#define ITEM_BOTTLE_CAP 0x27F
#define ITEM_GOLD_BOTTLE_CAP 0x280
#define ITEM_WISHING_PIECE 0x281

//EV Gain Items
#define ITEM_POWER_BRACER 0x282
#define ITEM_POWER_BELT 0x283
#define ITEM_POWER_LENS 0x284
#define ITEM_POWER_BAND 0x285
#define ITEM_POWER_ANKLET 0x286
#define ITEM_POWER_WEIGHT 0x287

//New Incense
#define ITEM_LUCK_INCENSE 0x288
#define ITEM_FULL_INCENSE 0x289
#define ITEM_ODD_INCENSE 0x28A
#define ITEM_PURE_INCENSE 0x28B
#define ITEM_ROCK_INCENSE 0x28C
#define ITEM_ROSE_INCENSE 0x28D
#define ITEM_WAVE_INCENSE 0x28E

//Gems
#define ITEM_NORMAL_GEM 0x28F
#define ITEM_FIGHTING_GEM 0x290
#define ITEM_FLYING_GEM 0x291
#define ITEM_POISON_GEM 0x292
#define ITEM_GROUND_GEM 0x293
#define ITEM_ROCK_GEM 0x294
#define ITEM_BUG_GEM 0x295
#define ITEM_GHOST_GEM 0x296
#define ITEM_STEEL_GEM 0x297
#define ITEM_FIRE_GEM 0x298
#define ITEM_WATER_GEM 0x299
#define ITEM_GRASS_GEM 0x29A
#define ITEM_ELECTRIC_GEM 0x29B
#define ITEM_PSYCHIC_GEM 0x29C
#define ITEM_ICE_GEM 0x29D
#define ITEM_DRAGON_GEM 0x29E
#define ITEM_DARK_GEM 0x29F
#define ITEM_FAIRY_GEM 0x2A0

//New Battle Hold Items
#define ITEM_WIDE_LENS 0x2A1
#define ITEM_MUSCLE_BAND 0x2A2
#define ITEM_WISE_GLASSES 0x2A3
#define ITEM_EXPERT_BELT 0x2A4
#define ITEM_LIGHT_CLAY 0x2A5
#define ITEM_LIFE_ORB 0x2A6
#define ITEM_POWER_HERB 0x2A7
#define ITEM_TOXIC_ORB 0x2A8
#define ITEM_FLAME_ORB 0x2A9
#define ITEM_QUICK_POWDER 0x2AA
#define ITEM_FOCUS_SASH 0x2AB
#define ITEM_ZOOM_LENS 0x2AC
#define ITEM_METRONOME 0x2AD
#define ITEM_IRON_BALL 0x2AE
#define ITEM_LAGGING_TAIL 0x2AF
#define ITEM_DESTINY_KNOT 0x2B0
#define ITEM_BLACK_SLUDGE 0x2B1
#define ITEM_ICY_ROCK 0x2B2
#define ITEM_SMOOTH_ROCK 0x2B3
#define ITEM_HEAT_ROCK 0x2B4
#define ITEM_DAMP_ROCK 0x2B5
#define ITEM_GRIP_CLAW 0x2B6
#define ITEM_CHOICE_SCARF 0x2B7
#define ITEM_CHOICE_SPECS 0x2B8
#define ITEM_STICKY_BARB 0x2B9
#define ITEM_SHED_SHELL 0x2BA
#define ITEM_BIG_ROOT 0x2BB
#define ITEM_EVIOLITE 0x2BC
#define ITEM_FLOAT_STONE 0x2BD
#define ITEM_ROCKY_HELMET 0x2BE
#define ITEM_AIR_BALLOON 0x2BF
#define ITEM_RED_CARD 0x2C0
#define ITEM_RING_TARGET 0x2C1
#define ITEM_BINDING_BAND 0x2C2
#define ITEM_ABSORB_BULB 0x2C3
#define ITEM_CELL_BATTERY 0x2C4
#define ITEM_EJECT_BUTTON 0x2C5
#define ITEM_WEAKNESS_POLICY 0x2C6
#define ITEM_ASSAULT_VEST 0x2C7
#define ITEM_LUMINOUS_MOSS 0x2C8
#define ITEM_SNOWBALL 0x2C9
#define ITEM_SAFETY_GOGGLES 0x2CA
#define ITEM_ADRENALINE_ORB 0x2CB
#define ITEM_TERRAIN_EXTENDER 0x2CC
#define ITEM_PROTECTIVE_PADS 0x2CD
#define ITEM_ELECTRIC_SEED 0x2CE
#define ITEM_GRASSY_SEED 0x2CF
#define ITEM_MISTY_SEED 0x2D0
#define ITEM_PSYCHIC_SEED 0x2D1
#define ITEM_EJECT_PACK 0x2D2
#define ITEM_ROOM_SERVICE 0x2D3
#define ITEM_BLUNDER_POLICY 0x2D4
#define ITEM_HEAVY_DUTY_BOOTS 0x2D5
#define ITEM_UTILITY_UMBRELLA 0x2D6
#define ITEM_THROAT_SPRAY 0x2D7
#define ITEM_ABILITY_CAPSULE 0x2D8
#define ITEM_FREE_SPACE_1 0x2D9
#define ITEM_FREE_SPACE_2 0x2DA
#define ITEM_FREE_SPACE_3 0x2DB
#define ITEM_FREE_SPACE_4 0x2DC
#define ITEM_FREE_SPACE_5 0x2DD
#define ITEM_FREE_SPACE_6 0x2DE
#define ITEM_FREE_SPACE_7 0x2DF
#define ITEM_FREE_SPACE_8 0x2E0
#define ITEM_FREE_SPACE_9 0x2E1
#define ITEM_FREE_SPACE10 0x2E2
#define ITEM_FREE_SPACE11 0x2E3
#define ITEM_FREE_SPACE12 0x2E4
#define ITEM_FREE_SPACE13 0x2E5
#define ITEM_FREE_SPACE14 0x2E6
#define ITEM_FREE_SPACE15 0x2E7
#define ITEM_FREE_SPACE16 0x2E8
#define ITEM_FREE_SPACE17 0x2E9
#define ITEM_FREE_SPACE18 0x2EA
#define ITEM_FREE_SPACE19 0x2EB
#define ITEM_FREE_SPACE20 0x2EC
#define ITEM_FREE_SPACE21 0x2ED

#define ITEMS_COUNT (ITEM_FREE_SPACE21 + 1)

//For Pokemon Unbound
#ifdef UNBOUND

#undef ITEM_ENIGMA_BERRY

#define ITEM_ODDISH_LEAF 0x57
#define ITEM_ENIGMA_BERRY 0x76
#define ITEM_DOWSING_MACHINE 0x105
#define ITEM_GRUBBY_HANKY 0x10A
#define ITEM_UNIFORM 0x10B
#define ITEM_FASHION_CASE 0x10E
#define ITEM_POKE_BALL_KEY_ITEM 0x111
#define ITEM_KEY_CARD_1 0x163
#define ITEM_KEY_CARD_2 0x11A
#define ITEM_KEY_CARD_3 0x11B
#define ITEM_QUEST_LOG 0x15C
#define ITEM_SMELLY_SOCKS 0x15F
#define ITEM_COSTUME_BOX 0x15C

#define ITEM_MEGA_CUFF 0x77
#define ITEM_MEGA_BONNET 0x78
#define ITEM_MEGA_EARING 0x20F
#define ITEM_MEGA_CHARM 0x210
#define ITEM_MEGA_BRACELET 0x211
#define ITEM_MEGA_ANKLET 0x212
#define ITEM_MEGA_PENDANT 0x213

//TMs & HMs
enum
{
  ITEM_TM01_FOCUS_PUNCH = 0x121,
  ITEM_TM02_DRAGON_CLAW,
  ITEM_TM03_WATER_PULSE,
  ITEM_TM04_CALM_MIND,
  ITEM_TM05_ROAR,
  ITEM_TM06_TOXIC,
  ITEM_TM07_HAIL,
  ITEM_TM08_BULK_UP,
  ITEM_TM09_BULLET_SEED,
  ITEM_TM10_HIDDEN_POWER,
  ITEM_TM11_SUNNY_DAY,
  ITEM_TM12_TAUNT,
  ITEM_TM13_ICE_BEAM,
  ITEM_TM14_BLIZZARD,
  ITEM_TM15_HYPER_BEAM,
  ITEM_TM16_LIGHT_SCREEN,
  ITEM_TM17_PROTECT,
  ITEM_TM18_RAIN_DANCE,
  ITEM_TM19_GIGA_DRAIN,
  ITEM_TM20_SAFEGUARD,
  ITEM_TM21_FRUSTRATION,
  ITEM_TM22_SOLARBEAM,
  ITEM_TM23_IRON_TAIL,
  ITEM_TM24_THUNDERBOLT,
  ITEM_TM25_THUNDER,
  ITEM_TM26_EARTHQUAKE,
  ITEM_TM27_RETURN,
  ITEM_TM28_DIG,
  ITEM_TM29_PSYCHIC,
  ITEM_TM30_SHADOW_BALL,
  ITEM_TM31_BRICK_BREAK,
  ITEM_TM32_DOUBLE_TEAM,
  ITEM_TM33_REFLECT,
  ITEM_TM34_SHOCK_WAVE,
  ITEM_TM35_FLAMETHROWER,
  ITEM_TM36_SLUDGE_BOMB,
  ITEM_TM37_SANDSTORM,
  ITEM_TM38_FIRE_BLAST,
  ITEM_TM39_ROCK_TOMB,
  ITEM_TM40_AERIAL_ACE,
  ITEM_TM41_TORMENT,
  ITEM_TM42_FACADE,
  ITEM_TM43_SECRET_POWER,
  ITEM_TM44_REST,
  ITEM_TM45_ATTRACT,
  ITEM_TM46_THIEF,
  ITEM_TM47_STEEL_WING,
  ITEM_TM48_SKILL_SWAP,
  ITEM_TM49_LEECH_FANG,
  ITEM_TM50_OVERHEAT,
  ITEM_TM51_ROOST,
  ITEM_TM52_FOCUS_BLAST,
  ITEM_TM53_ENERGY_BALL,
  ITEM_TM54_FALSE_SWIPE,
  ITEM_TM55_BRINE,
  ITEM_TM56_HONE_CLAWS,
  ITEM_TM57_CHARGE_BEAM,
  ITEM_TM58_ENDURE,
  ITEM_TM59_DRAGON_PULSE = 0x177,
  ITEM_TM60_DRAIN_PUNCH,
  ITEM_TM61_WILL_O_WISP,
  ITEM_TM62_SILVER_WIND,
  ITEM_TM63_VENOSHOCK,
  ITEM_TM64_EXPLOSION,
  ITEM_TM65_SHADOW_CLAW,
  ITEM_TM66_PAYBACK,
  ITEM_TM67_RECYCLE,
  ITEM_TM68_GIGA_IMPACT,
  ITEM_TM69_ROCK_POLISH,
  ITEM_TM70_FLASH,
  ITEM_TM71_STONE_EDGE,
  ITEM_TM72_AVALANCHE,
  ITEM_TM73_THUNDER_WAVE,
  ITEM_TM74_GYRO_BALL,
  ITEM_TM75_SWORDS_DANCE,
  ITEM_TM76_STEALTH_ROCK,
  ITEM_TM77_FLAME_CHARGE,
  ITEM_TM78_LOW_SWEEP,
  ITEM_TM79_DARK_PULSE,
  ITEM_TM80_ROCK_SLIDE,
  ITEM_TM81_X_SCISSOR,
  ITEM_TM82_SLEEP_TALK,
  ITEM_TM83_SCALD,
  ITEM_TM84_POISON_JAB,
  ITEM_TM85_DREAM_EATER,
  ITEM_TM86_GRASS_KNOT,
  ITEM_TM87_SWAGGER,
  ITEM_TM88_PLUCK,
  ITEM_TM89_U_TURN,
  ITEM_TM90_SUBSTITUTE,
  ITEM_TM91_FLASH_CANNON,
  ITEM_TM92_VOLT_SWITCH,
  ITEM_TM93_DRAGON_TAIL,
  ITEM_TM94_INCINERATE,
  ITEM_TM95_STRUGGLE_BUG,
  ITEM_TM96_BULLDOZE,
  ITEM_TM97_FROST_BREATH,
  ITEM_TM98_WORK_UP,
  ITEM_TM99_WILD_CHARGE,
  ITEM_TM100_INFESTATION,
  ITEM_TM101_POWER_UP_PUNCH,
  ITEM_TM102_DAZZLING_GLEAM,
  ITEM_TM103_SLUDGE_WAVE,
  ITEM_TM104_PSYSHOCK,
  ITEM_TM105_BRUTAL_SWING,
  ITEM_TM106_SMART_STRIKE,
  ITEM_TM107_ACROBATICS,
  ITEM_TM108_SNARL,
  ITEM_TM109_DEFOG,
  ITEM_TM110_DRAINING_KISS,
  ITEM_TM111_SMACK_DOWN,
  ITEM_TM112_ROUND,
  ITEM_TM113_ECHOED_VOICE,
  ITEM_TM114_NATURAL_GIFT,
  ITEM_TM115_QUASH,
  ITEM_TM116_TRICK_ROOM,
  ITEM_TM117_FLING,
  ITEM_TM118_AURORA_VEIL,
  ITEM_TM119_SKY_DROP,
  ITEM_TM120_NATURE_POWER,
  ITEM_HM01_CUT,
  ITEM_HM02_FLY,
  ITEM_HM03_SURF,
  ITEM_HM04_STRENGTH,
  ITEM_HM05_DIVE,
  ITEM_HM06_ROCK_SMASH,
  ITEM_HM07_WATERFALL,
  ITEM_HM08_ROCK_CLIMB,
};

#endif

// Emerald
#define FIRST_BERRY_INDEX ITEM_CHERI_BERRY
#define LAST_BERRY_INDEX ITEM_ENIGMA_BERRY
#define ITEM_TO_BERRY(itemId)(((itemId - FIRST_BERRY_INDEX) + 1))

#define NUM_TECHNICAL_MACHINES 50
#define NUM_HIDDEN_MACHINES   8

// Check if the item is one that can be used on a Pokemon.
#define IS_POKEMON_ITEM(item) ((item) >= ITEM_POTION && (item) <= ITEM_0B2)

// POCKETS
#define POCKET_ITEMS    1
#define POCKET_KEY_ITEMS  2
#define POCKET_POKE_BALLS 3
#define POCKET_TM_CASE   4
#define POCKET_BERRY_POUCH 5